package cn.dgiot.fd.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import cn.dgiot.fd.dao.IDeviceStateDAO;
import cn.dgiot.fd.model.DeviceStateModel;
import cn.dgiot.fd.service.IDeviceStateService;

/**
 * [设备状态]
 * @author
 *
 */
@Service
public class DeviceStateServiceImpl implements IDeviceStateService{

	/** 设备状态 */
	@Autowired
	private IDeviceStateDAO deviceStateDAO;
	
	@Override
	public DeviceStateModel getDeviceState(DeviceStateModel deviceStateModel) {
		return deviceStateDAO.getDeviceState(deviceStateModel);
	}

	@Override
	public void insertDeviceState(DeviceStateModel deviceStateModel) {
		deviceStateDAO.insertDeviceState(deviceStateModel);
	}

	@Override
	@Transactional
	public void updateDeviceState(DeviceStateModel deviceStateModel) {
		deviceStateDAO.updateDeviceState(deviceStateModel);
	}

	@Override
	public void batchInsertDeviceState(DeviceStateModel deviceStateModel) {
		// TODO Auto-generated method stub
		deviceStateDAO.batchInsertDeviceState(deviceStateModel);
	}

	@Override
	public List<DeviceStateModel> getUpdateDeviceList(DeviceStateModel deviceStateModel) {
		// TODO Auto-generated method stub
		return deviceStateDAO.getUpdateDeviceList(deviceStateModel);
	}

	@Override
	public void deleteDeviceState(DeviceStateModel deviceStateModel) {
		// TODO Auto-generated method stub
		deviceStateDAO.deleteDeviceState(deviceStateModel);
	}
}
